--游戏主要控制器管理类
--create by lwt
--date 2018-4-12
require "Common/class"
require "Controller/MyPromptCtrl"
require "Controller/LoadIngCtrl"
require "Controller/LoginCtrl"
require "Controller/HallCtrl"
require "Controller/JoinRoomCtrl"
require "Controller/SettingCtrl"

require "ProtoBuffer/mainGame/CommonMain_pb"
require "ProtoBuffer/mainGame/login_pb"

GameMainCtrlManager = class("GameMainCtrlManager")
--控制器名字合集
-- GameMainCtrlNames = {
-- 	Prompt = "Prompt",
-- 	Message = "Message"
-- }


--注册控制器
function GameMainCtrlManager:Init()
	self:RegisterCtrlName()
	self:RegisterCtrl()
end

function GameMainCtrlManager:RegisterCtrlName()
	CtrlNames.Prompt = "Prompt"
	CtrlNames.Message = "Message"
	CtrlNames.Loading = "Loading"
	CtrlNames.Login = "Login"
	CtrlNames.Hall = "Hall"
	CtrlNames.JoinRoom = "JoinRoom"
	CtrlNames.Setting = "Setting"
end

function GameMainCtrlManager:RegisterCtrl()
	CtrlManager.AddCtrl(CtrlNames.Prompt,MyPromptCtrl)
	CtrlManager.AddCtrl(CtrlNames.Loading,LoadIngCtrl)
	CtrlManager.AddCtrl(CtrlNames.Login,LoginCtrl)
	CtrlManager.AddCtrl(CtrlNames.Hall,HallCtrl)
	CtrlManager.AddCtrl(CtrlNames.JoinRoom,JoinRoomCtrl)
	CtrlManager.AddCtrl(CtrlNames.Setting,SettingCtrl)
end